unit KontoKopiranjeFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DialogGridFrm, cxStyles, cxGraphics, cxEdit, cxClasses,
  cxGridBandedTableView, ImgList, cxEditRepositoryItems, cxContainer,
  StdActns, ActnList, cxControls, cxInplaceContainer, cxVGrid, StdCtrls,
  ExtCtrls, DB, DBClient, alBaseDataSet, MConnect, cxDBEditRepository;

type
  TfrmKontoKopiranje = class(TfrmDialogGrid)
    lkpcbPoslovnoLeto: TcxEditorRow;
    lblPoslovnoLeto: TcxCategoryRow;
    rpstMainPoslovnoLetoNaziv: TcxEditRepositoryLookupComboBoxItem;
    scnMain: TSharedConnection;
    cdsMain: TBaseDataSet;
    dtsrcMain: TDataSource;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  protected
    procedure Deinitialize; override;
    procedure Initialize; override;
  public
    { Public declarations }
  end;

var
  frmKontoKopiranje: TfrmKontoKopiranje;

implementation

{$R *.dfm}

procedure TfrmKontoKopiranje.Deinitialize;
begin
  inherited;
  cdsMain.Close;
end;

procedure TfrmKontoKopiranje.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  Action := caHide;
end;

procedure TfrmKontoKopiranje.Initialize;
begin
  inherited;
  cdsMain.Params.ParamByName('PODJETJE_ID').Value :=
    Session.Params['PODJETJE_ID'];
  cdsMain.Filter := Format('ID <> %s', [Session.Params['POSLOVNO_LETO_ID']]);
  cdsMain.Filtered := True;
  cdsMain.Open;
end;

end.
